package br.com.ss.dao;

import java.util.HashMap;
import java.util.List;

import javax.ejb.Stateless;

import br.com.ss.entity.Menu;
import br.com.ss.enumeration.EPerfilMenu;

@Stateless
public class MenuDAO extends AbstractDAO<Menu> {

	 public MenuDAO() {
	        super(Menu.class);
	    }

	public List<Menu> recuperaMenu(EPerfilMenu perfil) {
		
		HashMap<String, Object> filter = new HashMap<String, Object>();
		filter.put("perfil", perfil);
		
		String query = 	" SELECT m "
					+ 	" FROM   Menu m "
					+ 	" WHERE m.perfil =:perfil ";
		
		
		return find(query, filter);
		
//		return null;
	
	}
	 
	    
}
